home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXT Education Software Sampler 1992 Fall
/
NeXT Education Software Sampler 1992 Fall.iso
/
Physics
/
Rotator
/
Rotator.app
/
RotatingPendulum.ma
next >
Wrap
Text File
|
1991-12-05
|
7KB
|
134 lines
(*^
::[paletteColors = 128; currentKernel;
fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e8, 24, "Times"; ;
fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L1, e6, 18, "Times"; ;
fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, L1, e6, 14, "Times"; ;
fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L1, a20, 18, "Times"; ;
fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L1, a15, 14, "Times"; ;
fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L1, a12, 12, "Times"; ;
fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ;
fontset = input, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L1, 12, "Courier"; ;
fontset = output, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ;
fontset = message, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ;
fontset = print, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ;
fontset = info, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L1, 12, "Courier"; ;
fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakBelow, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L1, 12, "Courier"; ;
fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, L1, 10, "Times"; ;
fontset = header, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = Left Header, nohscroll, cellOutline, 12;
fontset = footer, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, L1, 12;
fontset = Left Footer, cellOutline, blackBox, 12;
fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 10, "Times"; ;
fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12, "Courier"; ;
fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;
fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L1, 12;]
:[font = title; inactive; preserveAspect; ]
Lagrange's Equations for the Motion of a Rotating Pendulum.
:[font = subtitle; inactive; preserveAspect; ]
by Charles G. Fleming
Educational Computing Services
Allegheny College
Partially supported by a grant from the
Vira Heinz Endowment.
:[font = section; inactive; Cclosed; preserveAspect; startGroup; ]
The derivation of the Lagrange's equations.
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
The Coordinates
:[font = input; inactive; Cclosed; preserveAspect; startGroup; ]
The rotating pendulum is formed by attaching a pendulum to
a circular wheel which is rotating at a constant angular
speed, denoted by w, and which is centered at the origin of
a cartesian coordinate system. We let r denote the radius
of the wheel, The pendulum has an arm whose length will be
denoted by l. Finally, theangle formed by the pendulum arm
and the y axis is denoted by theta. Theta is measured
counterclockwise from the negative y axis. With these
variables, the position of themass is given by the following
formulas.
;[s]
2:0,0;1,1;542,-1;
2:1,10,8,Courier,1,12,0,0,0;1,14,11,Times,0,16,0,0,0;
:[font = input; initialization; preserveAspect; ]
*)
x = r Cos[w t] + l Sin[theta[t]]
(*
:[font = input; initialization; preserveAspect; endGroup; endGroup; ]
*)
y = r Sin[w t] - l Cos[theta[t]]
(*
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
Kinetic Energy
:[font = input; inactive; Cclosed; preserveAspect; startGroup; ]
The kinetic energy of the system is computed by using the
usual formula K.E. = 1/2 (m1v12 + m2v22). We will
denote the kinetic energy by T.
;[s]
11:0,0;87,1;88,2;89,3;90,4;91,5;95,6;96,7;97,8;98,9;99,10;142,-1;
11:1,13,10,Courier,0,16,0,0,0;1,13,10,Courier,64,16,0,0,0;1,13,10,Courier,0,16,0,0,0;1,13,10,Courier,64,16,0,0,0;1,13,10,Courier,32,16,0,0,0;1,13,10,Courier,0,16,0,0,0;1,13,10,Courier,64,16,0,0,0;1,13,10,Courier,0,16,0,0,0;1,13,10,Courier,64,16,0,0,0;1,13,10,Courier,32,16,0,0,0;1,13,10,Courier,0,16,0,0,0;
:[font = input; initialization; preserveAspect; ]
*)
T = (m/2) (D[x,t]^2 + D[y,t]^2)
(*
:[font = input; initialization; preserveAspect; ]
*)
T = Expand[%]
(*
:[font = input; initialization; preserveAspect; ]
*)
T = % /. Cos[x_]^2 :> 1 - Sin[x]^2
(*
:[font = input; initialization; preserveAspect; ]
*)
T = Simplify[%]
(*
:[font = input; initialization; preserveAspect; endGroup; endGroup; ]
*)
T = m/2 (r^2 w^2 + 2 l r w Sin[theta[t] - t w] theta'[t]
+ l^2 theta'[t]^2)
(*
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
Potential Energy
:[font = input; inactive; Cclosed; preserveAspect; startGroup; ]
The potential energy of the mass at the end of the pendulum
is given by the usual formula.
;[s]
1:0,0;90,-1;
1:1,14,11,Times,0,16,0,0,0;
:[font = input; initialization; preserveAspect; endGroup; endGroup; ]
*)
V = m g y
(*
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
Lagrangian
:[font = input; inactive; Cclosed; preserveAspect; startGroup; ]
Recall that the Lagrangian is the kinetic energy minus the
potential energy.
;[s]
1:0,0;76,-1;
1:1,14,11,Times,0,16,0,0,0;
:[font = input; initialization; preserveAspect; endGroup; endGroup; ]
*)
L = T - V
(*
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup; ]
Lagrange's Equations
:[font = input; inactive; Cclosed; preserveAspect; startGroup; ]
Our last step is to compute Langrange's equations.
These second order equations will describe the motion of
the springy pendulum.
;[s]
1:0,0;131,-1;
1:1,14,11,Times,0,16,0,0,0;
:[font = input; initialization; preserveAspect; endGroup; endGroup; endGroup; ]
*)
Simplify[D[ D[L, theta'[t]], t] - D[L, theta[t]]]
(*
^*)